home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Review 34
/
Creative-Review-CD-ROM-34.iso
/
pc
/
foo
/
foos.dir
/
00095_Script_Sound Play Castmember
< prev
next >
Wrap
Text File
|
1998-01-23
|
2KB
|
71 lines
-- Sound Play Member
-- also functions through lingo by handling message 'initPlayMember',
-- for example if this behavior was assigned to sprite 5, use
-- sendsprite 5, #initPlayMember
-- Media
property WhichEvent, WhichSound, WhichChannel, StartImmediately
property tester
on initPlayMember me
init me
end
on mouseUp me
if whichEvent = #mouseup then init me
end
on mouseDown me
if whichEvent = #mousedown then init me
end
on prepareFrame me
if whichEvent = #prepareframe then init me
end
on enterFrame me
if whichEvent = #enterframe then init me
end
on exitFrame me
if whichEvent = #exitframe then init me
end
on init me
puppetSound the WhichChannel of me, the whichSound of me
if the StartImmediately of me then updatestage
end
---
on getPropertyDescriptionList
set p_list = [ ¼
#WhichSound: [ #comment: "Sound:", ¼
#format: #sound, ¼
#default: "" ], ¼
#WhichChannel: [ #comment: "Channel:", ¼
#format: #integer, ¼
#default: 1 ], ¼
#WhichEvent: [ #comment: "Initializing Event:", ¼
#format: #symbol, ¼
#range: [ #MouseUp, #MouseDown, #PrepareFrame, #EnterFrame, #ExitFrame, #InitPlayMember ], ¼
#default: #MouseUp ]¼
]
return p_list
end
on getBehaviorDescription
return ¼
"Plays the designated sound cast member when the specified event occurs, or when the message ." & RETURN & ¼
"PARAMETERS:" & RETURN & ¼
"ò Sound - Choose the sound cast member to be played." & RETURN & ¼
"ò Channel - Enter the sound channel number to be used for playback." & RETURN & ¼
"ò Initializing Event - Specify the event that triggers the behavior."
end